package com.sky.mapper;

import com.sky.entity.Register;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface RegisterMapper {
    @Select("select * from register where username=#{username}")
    Register getByUsername(String username);

    void insert(Register register1);
    @Select("select * from register where result is null or result=''")
    List<Register> getNoAudit();
    @Select("select * from register where result='0' ")
    List<Register> getNoPass();
    @Delete("delete from register where id=#{id}")
    void deleteById(Integer id);
    @Update("update register set result='0' where id=#{id}")
    void rejectRegister(Integer id);
    @Select("select * from register where id=#{id}")
    Register getById(Integer id);
}
